package com.wsd.domain;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author Wan Yucan
 * @date 2020/7/14-11:27
 */
@Component
@Scope("prototype")

public class RepayPlan {

    private long loanId;
    private int installmentIdx;
    private BigDecimal repayableAmount;
    private BigDecimal principalPart;
    private BigDecimal interestPart;
    private LocalDate repaymentDate;
    private String repaymentStatus;

    public String getRepaymentStatus() {
        return repaymentStatus;
    }

    public void setRepaymentStatus(String repaymentStatus) {
        this.repaymentStatus = repaymentStatus;
    }

    public long getLoanId() {
        return loanId;
    }

    public void setLoanId(long loanId) {
        this.loanId = loanId;
    }

    public int getInstallmentIdx() {
        return installmentIdx;
    }

    public void setInstallmentIdx(int installmentIdx) {
        this.installmentIdx = installmentIdx;
    }

    public BigDecimal getRepayableAmount() {
        return repayableAmount;
    }

    public void setRepayableAmount(BigDecimal repayableAmount) {
        this.repayableAmount = repayableAmount;
    }

    public BigDecimal getPrincipalPart() {
        return principalPart;
    }

    public void setPrincipalPart(BigDecimal principalPart) {
        this.principalPart = principalPart;
    }

    public BigDecimal getInterestPart() {
        return interestPart;
    }

    public void setInterestPart(BigDecimal interestPart) {
        this.interestPart = interestPart;
    }

    public LocalDate getRepaymentDate() {
        return repaymentDate;
    }

    public void setRepaymentDate(LocalDate repaymentDate) {
        this.repaymentDate = repaymentDate;
    }

    @Override
    public String toString() {
        return "RepayPlan{" +
                "loanId=" + loanId +
                ", installmentIdx=" + installmentIdx +
                ", repayableAmount=" + repayableAmount +
                ", principalPart=" + principalPart +
                ", interestPart=" + interestPart +
                ", repaymentDate=" + repaymentDate +
                '}';
    }
}
